# mobile_extensions.pro

!symbian: error(Mobile Extension for Qt for Symbian can only be used on Symbian platform)

isEmpty(MOBILE_EXTENSIONS_SOURCEPATH) {
    error(Please run configure.bat first!)
}

lessThan(QT_MAJOR_VERSION, 4) {
    error(Qt $${QT_VERSION} found. Mobile Extension for Qt for Symbian requires Qt 4.6 or higher.);
}

contains(QT_MAJOR_VERSION, 4):lessThan(QT_MINOR_VERSION, 6) {
    error(Qt $${QT_VERSION} found. Mobile Extension for Qt for Symbian requires Qt 4.6 or higher.);
}

PRF_TARGETPATH = $$[QT_INSTALL_DATA]

isEmpty(PRF_TARGETPATH) {
    warning("No QT_INSTALL_DATA defined, using QT_INSTALL_PREFIX instead")
    PRF_TARGETPATH = $$[QT_INSTALL_PREFIX]
}

# Generate prf file for Qt integration
PRF_OUTPUT=$${MOBILE_EXTENSIONS_PRFPATH}/mobile_extensions.prf

system(echo SOURCES_PREFIX=$${MOBILE_EXTENSIONS_SOURCEPATH} > $$PRF_OUTPUT)

symbian: {
cmd_dump = type $${PRF_OUTPUT}.in >> $$PRF_OUTPUT
cmd_copy = copy $$PRF_OUTPUT $${PRF_TARGETPATH}/mkspecs/features/symbian
system($$replace(cmd_dump,/,\\))
system($$replace(cmd_copy,/,\\))
}

TEMPLATE = subdirs
SUBDIRS =
